O
Onno Pistorius

MudBlazor Dashboard Portal Design

MudBlazor Dashboard displays stat cards, line and bar charts, and a sortable employers table with filter selects. Uses MudBlazor components and Tailwind utility classes for responsive layout.

LIVE DEMO
Generated using Instruct UI - An AI for Blazor UI Generation
## What's implemented - Top app bar and responsive layout using MudLayout, MudAppBar and MudMainContent. - Filter row with MudSelect controls for employer, period and activity type. - Four stat cards rendered with MudPaper and icons. - Multiple charts (line and bar) using MudChart for activity trend, retention and growth. - Employers table using MudTable with sort labels, avatars, progress bars and conditional MudChip states. - Integration banner with action buttons and MudChip status indicator. ## Key components - MudLayout, MudAppBar, MudMainContent, MudContainer - MudGrid, MudItem, MudPaper, MudButton, MudIconButton - MudSelect, MudSelectItem - MudChart (line, bar), ChartSeries, ChartOptions - MudTable, MudTh, MudTd, MudTableSortLabel - MudAvatar, MudChip, MudProgressLinear ## How it works - Chart data is provided by ChartSeries lists and label arrays defined in the component code and passed to MudChart instances. - The employers list is populated in OnInitialized and rendered by MudTable; row template uses @context properties for display. - Sorting is enabled via MudTableSortLabel with SortBy delegates (e.g., new Func<EmployerViewModel, object>(x=>x.Name)). - UI interactions include button click handlers (SyncData, ViewLog) and MudSelect Value bindings for filter UI (static values in this demo). - Conditional rendering uses simple C# if statements inside Razor to toggle chips and icons per row. ## Styling - Primary UI library: MudBlazor components and theme primitives. - Utility classes use Tailwind-style utilities found in class attributes (flex, items-center, px-6, text-slate-900, md:flex, etc.). - Additional table styling is provided by a small app.css with .employers-table rules (row hover, head cell styles). - Layout uses MudGrid and Tailwind utilities for a responsive panel and card layout across breakpoints. ## Reuse steps 1. Add the MudBlazor NuGet package and call builder.Services.AddMudServices() in Program.cs; include MudBlazor CSS/JS and the project app.css. 2. Copy Dashboard.razor and EmployerViewModel.cs into a Blazor project and ensure _Imports.razor includes @using MudBlazor and the view model namespace. 3. Provide real data by replacing the OnInitialized mock list with a service-injected repository (register services in Program.cs and inject via @inject). 4. If Tailwind utilities are relied upon, include Tailwind in the build or adapt classes to existing CSS framework; keep the custom app.css rules for the table. 5. Extend MudChart series mapping and implement server-side sorting/paging on MudTable for large datasets. ## Limitations & next steps - This is a single demo page generated by Instruct UI; authentication, API services, and persistent state are not implemented. - Filters use static Value settings; connect MudSelect to bound properties and implement filter logic on the data source. - MudTable is client-side with mocked data; add paging, virtualization, and server-side sorting for production scale. - Chart interactions (click/hover events) and real-time updates require wiring to telemetry or WebSocket/SignalR services. - Accessibility, localization and unit tests need to be added for production readiness.